package sy.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.log4j.Logger;

import sy.dao.SysFunctionDaoI;
import sy.model.SysFunction;
import sy.service.SysFunctionServiceI;
import sy.util.Menu;

@Service("sysFunctionService")
public class SysFunctionServiceImpl implements SysFunctionServiceI {
	
	private static final Logger logger = Logger.getLogger(SysFunction.class);
	private SysFunctionDaoI sysFunctionDao;


	public SysFunctionDaoI getSysFunctionDao() {
		return sysFunctionDao;
	}

	@Autowired
	public void setSysFunctionDao(SysFunctionDaoI sysFunctionDao) {
		this.sysFunctionDao = sysFunctionDao;
	}

	@Override
	public Serializable save(SysFunction sysFunction) {
		
		return sysFunctionDao.save(sysFunction);
	}

	@Override
	public void remove(SysFunction sysFunction) {
		// TODO Auto-generated method stub
		sysFunctionDao.remove(sysFunction);
	}

	/* (non-Javadoc)
	 * @see sy.service.SysFunctionServiceI#update(sy.model.SysFunction)
	 */
	@Override
	public void update(SysFunction sysFunction) {
		// TODO Auto-generated method stub
		sysFunctionDao.update(sysFunction);
	}

	/* (non-Javadoc)
	 * @see sy.service.SysFunctionServiceI#list()
	 */
	@Override
	public List<SysFunction> list() {
		// TODO Auto-generated method stub
		return sysFunctionDao.list();
	}

	/* (non-Javadoc)
	 * @see sy.service.SysFunctionServiceI#getSysFunctionById(java.lang.String)
	 */
	@Override
	public SysFunction getSysFunctionById(String id) {
		// TODO Auto-generated method stub
		return sysFunctionDao.getSysFunctionById(id);
	}

	/* (non-Javadoc)
	 * @see sy.service.SysFunctionServiceI#listSysFunctionBykey(java.lang.String)
	 */
	@Override
	public List<SysFunction> listSysFunctionBykey(String key) {
		// TODO Auto-generated method stub
		return sysFunctionDao.listSysFunctionBykey(key);
	}

	@Override
	public List<Menu> listMenuByType(String user, String type,
			String functionPid) {
		// TODO Auto-generated method stub
		return sysFunctionDao.listMenuByType(user, type, functionPid);
	}



}
